package pl.szpadel.android.gadu.packets;

import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.channels.ReadableByteChannel;

public class SendMsgAck extends ReceivedPacket {

	// fields
	public int status;
	public int recipient;
	public int seq;
	
	
	public SendMsgAck(Header hdr, InputStream stream) throws IOException {
		super(hdr, stream);
	}

	public SendMsgAck(Header hdr, ReadableByteChannel channel)
			throws IOException {
		super(hdr, channel);
	}

	@Override
	protected void readFromBuffer(ByteBuffer buffer) {
		status = buffer.getInt();
		recipient = buffer.getInt();
		seq = buffer.getInt();
	}

	@Override
	public String toString() {
		return "SendMsgAck ( "+
			"status=" + status + ", " +
			"recipient=" + recipient + ", " +
			"seq=" + seq + " )";
	}
}
